package cn.edu.hy.demo04.service;

import cn.edu.hy.demo04.dao.UserDao;
import cn.edu.hy.demo04.model.User;

import java.util.List;
import java.util.UUID;

public class UserService {


    private UserDao userDao;

    public void setUserDao(UserDao userDao) {
        this.userDao = userDao;
    }

    public void addUser(User user) {
        //业务逻辑处理
        user.setId(UUID.randomUUID().toString().replaceAll("-",""));
        userDao.addUser(user);

    }

    public List<User> findUserList(User user) {

        return userDao.findUserList(user);
    }
}
